package com.onlyoffice.demo.onlyoffice.controller;


import com.onlyoffice.demo.onlyoffice.domain.R;
import com.onlyoffice.demo.onlyoffice.domain.User;
import com.onlyoffice.demo.onlyoffice.service.IUserService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author ZWX
 * @since 2025-07-11
 */
@RestController
@RequestMapping("/user")
@RequiredArgsConstructor
public class UserController {
    private final IUserService userService;

    /**
     * 获取用户列表
     *
     * @param user 查询条件
     * @return 用户列表
     */
    @GetMapping
    public R<List<User>> getList(User user) {
        return R.ok(userService.list());
    }
}
